// 新增活动
import request from '@/utils/request'

export function uploadFile(data) {
  return request({
    url: '/common/upload/oss',
    method: 'post',
    data: data
  })
}

export function handerImg(e) {
  let type = 0
  let imgType = ['jpeg', 'png', 'tif']
  imgType.forEach((item) => {
    console.log('e' + e)
    console.log('item' + item)
    console.log(e.indexOf(item))
    if (e.indexOf(item) != -1) {
      type = 1
      return true
    }
  })
  if (type == 1) {
    return true
  } else {
    return false
  }

}
